package com.gmlive.recyclerview.gridpager.indicator

import androidx.recyclerview.widget.RecyclerView

/**
 * @Author svenj
 * @Date 2021/1/22
 * @Email svenjzm@gmail.com
 */
interface IPageIndicator: OnPageChangeListener {
    /**
     * Bind the indicator to a RecyclerView.
     *
     * @param view
     */
    fun setRecyclerView(view: RecyclerView?)

    /**
     * Bind the indicator to a RecyclerView.
     *
     * @param view
     * @param initialPosition
     */
    fun setRecyclerView(view: RecyclerView?, initialPosition: Int)

    /**
     *
     * Set the current page of both the RecyclerView and indicator.
     *
     *
     *
     * This **must** be used if you need to set the page before
     * the views are drawn on screen (e.g., default start page).
     *
     * @param item
     */
    fun setCurrentItem(item: Int)

    /**
     * Set a page change listener which will receive forwarded events.
     *
     * @param listener
     */
    fun setOnPageChangeListener(listener: OnPageChangeListener?)

    /**
     * Notify the indicator that the fragment list has changed.
     */
    fun notifyDataSetChanged()

    /**
     * Set a page column
     *
     * @param column
     */
    fun setPageColumn(column: Int)
}